class Vue{
    constructor(options){
        this.$el = typeof options.el === 'string' ? document.querySelector(options.el) : options.el
        this.data = options.data
        this.methods = options.methods
        this._proxy(options.data)
        new Observer(this.data)
        new Compiler(this)
    }
    _proxy(data){
        Object.keys(data).forEach(key=>{
            Object.defineProperty(this, key, {
                enumerable: true,
                configurable: true,
                get() {
                    return data[key]
                },
                set(newValue) {
                    if( newValue === data[key] ){
                        return
                    }
                    data[key] = newValue
                }
            })
        })
    }
}